import { httpInstance } from '@/utils/request'

interface UpdateNodeAPIData {
  project_id: string
  node_id: string
  images: string
  video: string
  video_image: string
  desc: string
}

interface UpdateNodeAPIResData {
  code: number
  data: null
  msg: string
  time: string
}

export function updateNodeAPI(
  data: UpdateNodeAPIData,
  token: string,
) {
  return httpInstance.post<
    UpdateNodeAPIResData,
    UpdateNodeAPIData
  >(
    'api/Project/updateNode',
    data,
    { headers: { token } },
  )
}
